home *** CD-ROM | disk | FTP | other *** search
- /**
- * Sets the command name of the action event fired by this button.
- * @param command The name of the action event command fired by this button
- */
- public void setActionCommand(String command)
- {
- actionCommand = command;
- }
-
- /**
- * Returns the command name of the action event fired by this button.
- * @return the action command name
- */
- public String getActionCommand()
- {
- return actionCommand;
- }
-
- /**
- * Adds the specified action listener to receive action events
- * from this button.
- * @param l the action listener
- */
- public void addActionListener(ActionListener l)
- {
- actionListener = AWTEventMulticaster.add(actionListener, l);
- }
-
- /**
- * Removes the specified action listener so it no longer receives
- * action events from this button.
- * @param l the action listener
- */
- public void removeActionListener(ActionListener l)
- {
- actionListener = AWTEventMulticaster.remove(actionListener, l);
- }
-
- /**
- * Fire an action event to the listeners.
- */
- protected void fireActionEvent()
- {
- if (actionListener != null)
- actionListener.actionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, actionCommand));
- }
-